/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const messageRouter = {
  path: '/messenger',
  component: Layout,
  hidden:false,
  redirect: 'noRedirect',
  name: '消息',
  meta: {
    title: '消息',
    icon: 'nested'
  },
  children: [
    {
      path: 'workbrench',
      component: () => import('@/views/messenger/workbrench/workbrench'), // Parent router-view
      name: '总览',
      meta: { title: '总览' }
      // redirect: '/message/inbox/index',
    },
    {
      path: 'config',
      component: () => import('@/views/messenger/index'), // Parent router-view
      name: '配置',
      meta: { title: '配置' },
      children:[
        {
          path: 'channel',
          component: () => import('@/views/messenger/channel/channel'), // Parent router-view
          name: '渠道',
          meta: { title: '渠道' }
          // redirect: '/message/inbox/index',
        },
        {
          path: 'channel-add',
          hidden:true,
          name: '新消息',
          component: () => import('@/views/messenger/channel/channel-add'),
          meta: { title: '新消息' }
        },
        {
          path: 'template',
          component: () => import('@/views/messenger/template/template'), // Parent router-view
          name: '模板',
          meta: { title: '模板' }
          // redirect: '/message/inbox/index',
        },
        {
          path: 'template-add',
          name: '新模板',
          hidden:true,
          component: () => import('@/views/messenger/template/template-add'),
          meta: { title: '新模板' }
        }

      ]
    },
    {
      path: 'message',
      component: () => import('@/views/messenger/message/message'), // Parent router-view
      name: '消息',
      meta: { title: '消息' }
      // redirect: '/message/inbox/index',
    },
    {
      path: 'message-inbox',
      component: () => import('@/views/messenger/message/message-inbox'), // Parent router-view
      name: '消息',
      meta: { title: '消息' }
      // redirect: '/message/inbox/index',
    },
    {
      path: 'message-add',
      hidden:true,
      name: '新消息',
      component: () => import('@/views/messenger/message/message-add'),
      meta: { title: '新消息' }
    },
    {
      path: 'receive',
      component: () => import('@/views/messenger/receive/receive'), // Parent router-view
      name: '发送列表',
      meta: { title: '发送列表' }
    },
    {
      path: 'receive-add',
      name: '新接收',
      hidden:true,
      component: () => import('@/views/messenger/receive/receive-add'),
      meta: { title: '新接收' }
    },
    {
      path: 'propelling',
      component: () => import('@/views/messenger/propelling/propelling'), // Parent router-view
      name: '任务',
      meta: { title: '任务' }
      // redirect: '/message/inbox/index',
    },
    {
      path: 'propelling-add',
      name: '新推送',
      hidden:true,
      component: () => import('@/views/messenger/propelling/propelling-add'),
      meta: { title: '新推送' }
    },
  ]
}

export default messageRouter
